package com.ccut.xunfeiSpringboot.mapper;

import com.ccut.xunfeiSpringboot.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {

    Student selectByUsername(String username);

    @Select("select * from xunfei.students_info where username = #{username} AND password = #{password}")
    Student selectByUsernameAndPassword(String username, String password);

    void insert(Student student);

    void deleteById(Integer id);

    void updateById(Student student);

    List<Student> selectAll();

    Student selectById(Integer id);
}